package com.xfc.sde.controller;

import com.xfc.sde.dto.OverlayDTO;
import com.xfc.sde.service.OverlayService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: chenss
 * @CreateTime: 2024-09-19
 * @Description: 叠加分析controller
 * @Version: 1.0
 */
@RestController
@RequestMapping("/overlay")
public class OverLayController {
    @Autowired
    private OverlayService overlayService;

    @PostMapping("")
    public String overlay(@Validated @RequestBody OverlayDTO overlayDTO) {

        return  overlayService.overlayWithPostGIS(overlayDTO);
    }
}
